<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta name="keywords" content=""/>
    <meta name="description" content="">
    <include file="public@head"/>
</head>

<body class="body-white">
<include file="public@nav"/>

<div class="container tc-main">
    <div class="row">
        <div class="col-md-4 col-md-offset-4">
            <h2 class="text-center">用户注册</h2>
            <php>
                $is_open_registration = cmf_is_open_registration();
            </php>
            <ul class="nav nav-tabs nav-justified" id="myTab" style="margin-bottom: 15px;">
                <li class="active"><a href="#login" data-toggle="tab">用户名注册</a></li>
                <li><a href="#mobile" data-toggle="tab">手机注册</a></li>
                <li><a href="#email" data-toggle="tab">邮箱注册</a></li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane active" id="login">
                    <form class="js-ajax-form" action="{:url('user/Register/doRegister')}" method="post">
                        <input type="hidden" name="type" value="1">
                        <div class="form-group">
                            <input type="text" name="username" placeholder="用户名" class="form-control">
                        </div>

                        <div class="form-group">
                            <div style="position: relative;">
                                <input type="text" name="captcha" placeholder="验证码" class="form-control">
                                <captcha height="38" width="160" font-size="20"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <input type="password" name="password" placeholder="密码" class="form-control">
                        </div>
                        <div class="form-group">
                            <button class="btn btn-primary btn-block js-ajax-submit" type="submit" data-wait="1500"  style="margin-left: 0px;">确定注册</button>
                        </div>
                        <div class="form-group" style="text-align: center;">
                            <p>
                                已有账号? <a href="{:cmf_url('user/Login/index')}">点击此处登录</a>
                            </p>
                        </div>
                    </form>
                </div>
                <div class="tab-pane" id="mobile">
                    <form class="js-ajax-form" action="{:url('user/Register/doRegister')}" method="post">
                        <input type="hidden" name="type" value="2">
                        <div class="form-group">
                            <input type="text" name="username" placeholder="手机号" class="form-control"
                                   id="js-mobile-input">
                        </div>

                        <div class="form-group">
                            <div style="position: relative;">
                                <input type="text" name="captcha" placeholder="验证码" class="form-control">
                                <captcha height="38" width="160" font-size="20"/>
                            </div>
                        </div>
                        <empty name="is_open_registration">
                            <div class="form-group">
                                <div style="position: relative;">
                                    <input type="text" name="code" placeholder="手机验证码" class="form-control">
                                    <a class="btn btn-success js-get-mobile-code"
                                       style="width: 163px;position: absolute;top:0;right: 0;"
                                       data-wait-msg="[second]秒后才能再次获取" data-mobile-input="#js-mobile-input"
                                       data-url="{:url('user/VerificationCode/send')}"
                                       daty-type="register"
                                       data-init-second-left="60">获取手机验证码</a>
                                </div>
                            </div>
                        </empty>
                        <div class="form-group">
                            <input type="password" name="password" placeholder="密码" class="form-control">
                        </div>

                        <div class="form-group">
                            <button class="btn btn-primary btn-block js-ajax-submit" type="submit" data-wait="1500"
                                    style="margin-left: 0px;">确定注册
                            </button>
                        </div>

                        <div class="form-group" style="text-align: center;">
                            <p>
                                已有账号? <a href="{:cmf_url('user/Login/index')}">点击此处登录</a>
                            </p>
                        </div>
                    </form>
                </div>
                <div class="tab-pane" id="email">
                    <form class="js-ajax-form" action="{:url('user/register/doRegister')}" method="post">
                        <input type="hidden" name="type" value="3">
                        <div class="form-group">
                            <input type="text" name="username" placeholder="邮箱" class="form-control"
                                   id="js-email-input">
                        </div>

                        <div class="form-group">
                            <div style="position: relative;">
                                <input type="text" name="captcha" placeholder="验证码" class="form-control">
                                <captcha height="38" width="160" font-size="20"/>
                            </div>
                        </div>
                        <empty name="is_open_registration">
                            <div class="form-group">
                                <div style="position: relative;">
                                    <input type="text" name="code" placeholder="邮件验证码" class="form-control">
                                    <a class="btn btn-success js-get-email-code"
                                       style="width: 163px;position: absolute;top:0;right: 0;"
                                       data-wait-msg="[second]秒后才能再次获取" data-email-input="#js-email-input"
                                       data-url="{:url('user/VerificationCode/send')}"
                                       daty-type="register"
                                       data-init-second-left="60">获取邮箱验证码</a>
                                </div>
                            </div>
                        </empty>
                        <div class="form-group">
                            <input type="password" name="password" placeholder="密码" class="form-control">
                        </div>
                        <div class="form-group">
                            <button class="btn btn-primary btn-block js-ajax-submit" type="submit" data-wait="1500"
                                    style="margin-left: 0px;">确定注册
                            </button>
                        </div>
                        <div class="form-group" style="text-align: center;">
                            <p>
                                已有账号? <a href="{:cmf_url('user/Login/index')}">点击此处登录</a>
                            </p>
                        </div>
                    </form>

                </div>
            </div>
        </div>
    </div>

</div>
<!-- /container -->

<include file="public@scripts"/>
</body>
</html>